<%@page import="com.zqc.UserMassage"%>
<%@page import="com.zqc.leimu"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@ include file="lianjie.jsp"%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>图书</title>
</head>
<body>

   <form name="fm">
   <table align="center">
    	
         <tr style = "font-size:50px;">
         	<td >用户信息</td>
         </tr>
    </table>
   
		<table  border="0" cellspacing="0" cellpadding="1" align = "center">
		<%
			request.setCharacterEncoding("UTF-8");
			Object name = session.getAttribute("se_Name");
			Object sex = session.getAttribute("se_Sex");
			Object dlm = session.getAttribute("se_Dlm");
			Object tel = session.getAttribute("se_Tel");
			%>
			
			<tr>
				<td width="40">姓名:</td>
				<td width="60"><input type="text" value="<%=name %>" disabled></td>
				
			</tr>
			
			<tr>
				<td >学号:</td>
				<td ><input type="text" value="<%=dlm%>" disabled></td>
			</tr>
			<tr>
				<td >电话:</td>
				<td ><input type="text" value="<%=tel%>" disabled></td>
			</tr>
			<tr>
				<td >性别:</td>
				<td ><input type="text" value="<%=sex%>" disabled></td>
			</tr>
		</table>
		
		<hr/>
		<table align="center">
    	
         <tr style = "font-size:50px;">
         	<td >借书情况</td>
         </tr>
    </table>
		
		<table width="70%" border="1" cellspacing="0" cellpadding="3" align = "center">
			<tr>
				<th width="20%">borrow_userID</th>
				<th width="20%">borrow_bookISBN</th>
				<th width="20%">borrow_date</th>
				<th width="20%">borrow_bookname</th>
			</tr>
			<%
				String borrow_userID = ""; //
				String borrow_bookISBN = ""; //
				String borrow_date = ""; //
				String borrow_bookname = ""; //

				String sql = "select * from borrowinformation where userID = '" + dlm + "'";
				ResultSet rs1 = stmt.executeQuery(sql);
				
				while (rs1.next()) {
					borrow_userID = rs1.getString("userID");
					borrow_bookISBN = rs1.getString("bookISBN");
					borrow_date = rs1.getString("date");
					borrow_bookname = rs1.getString("bookname");
			%>
			
			<tr align = "center">
				<%-- <td><input type="checkbox" name="selectUser"
					value="<%=borrow_userID%>"><%=borrow_userID%></td> --%>
				<td><%=borrow_userID%></td>
				<td><%=borrow_bookISBN%></td>
				<td><%=borrow_date%></td>
				<td><%=borrow_bookname%></td>
			</tr>
			<%
				}
				session.setAttribute("userID", borrow_userID);
			%>
		</table>
		
		<br> 
		
		
		<hr/>
		<table align="center">
    	
	         <tr style = "font-size:50px;">
	         	<td >图书借阅</td>
	         </tr>
    	</table>
		<table  align = "center">
		<tr>
			<td>
				<a href="borrow_jisuanji.jsp">计算机类</a>
			</td>
		</tr>
		
		<tr>
			<td>
				<a href="borrow_shengmingkexue.jsp">生命科学类</a>
			</td>
		</tr>
		
		<tr>
			<td>
				<a href="borrow_yixue.jsp">医学类</a>
			</td>
		</tr>
		
		<tr>
			<td>
				<a href="borrow_xiaoshuo.jsp">小说类</a>
			</td>
		</tr>
		
		</table>
		<br><br><br>
		<div align="center" >
				<input type = "submit" name = "submit1" value = "退出登录" onclick = "return_login()" style = "font-size:20px;font-family:'微软雅黑';color: red;">
		</div>
		
		
	</form>
</body>
<script>
	function return_login(){
		document.fm.action = "aa_login.jsp";
	}
</script>
</html>